libtmux Reference MCP Search
On this page

selection.Selection.[Symbol.iterator]

View as Markdown

Module
selection
Declared in
Selection
Package
@libtmux/libtmux
Source
packages/libtmux/src/selection.ts
[Symbol.iterator] ( ) IterableIterator<Model>
method [source]
method [source]
[Symbol.iterator]

Iterate in tmux's own order.

Each call returns a fresh iterator, so a selection can be walked more than once: spread it and then loop it, and the second pass is not empty. This is what for...of, spread and destructuring all go through.

Examples

for (const window of snapshot.windows) window.name;
[...snapshot.windows].length === snapshot.windows.length;

0 declared, 0 inherited

Esc

Type to search.